<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style type="text/css">
		 *{
		 	padding: 0;
		 	margin: 0;
		 }
		 .left{
		 	width: 200px;
		 	height: 50px;
		 	background: pink;
		 	float: left;
		 }
		 .right{
		 	width: 600px;
		 	height: 50px;
		 	background: skyblue;
		 	float: right;
		 }
		 .con{
		 	width: 1000px;
		 	height: 500px;
		 	background: greenyellow;
		 	margin: 0 auto;
		 }
		 /*	1.给浮动元素的父元素设置高度
			     --优点是代码少，缺点是只适用于有固定高度的时候,如果浮动元素的高度与父级元素不一致，会产生留白 */
		 .nav{
		 	height: 50px;
		 }

	</style>
</head>
<body>
	<div class="nav">
       <div class="left"></div>
       <div class="right"></div>
    </div>
    <div class="con">
 	
    </div>
</body>
</html>		 